﻿using System;
using System.Collections.Generic;

    class MaXeL
    {
        static int FindMaxEl(int[] arr, int index)
        {
            int maxEl = 0;
            for (int i = index; i < arr.Length; i++)
            {
                if (arr[i] > maxEl)
                {
                    maxEl = arr[i];
                }
            }
            return maxEl;
        }
        static int[] SortInOrder(int[] arr)
        {
            Array.Sort(arr);
                return arr;
        }
        static void PrintArr(int[] arr, int index)
        {
            for (int i = index; i < arr.Length; i++)
            {
                Console.Write(arr[i] + " ");
            }
            Console.WriteLine();
        }
        static void PrintArrReversed(int[] arr, int index)
        {
            for (int i = arr.Length - 1; i >= index; i--)
            {
                Console.Write(arr[i]+" ");
            }
            Console.WriteLine();
        }

        static void Main(string[] args)
        {
            int[] arr = { 11, 3, 4, 5, 6, 8, 9 };
            int index = 2;
            Console.WriteLine(FindMaxEl(arr,index));
            PrintArr(arr, index);
            PrintArrReversed(arr, index);
        }
    }

